package com.graduation.mybatis.mapper;

import com.graduation.mybatis.bean.UserLike;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
* @author 23726
* @description 针对表【user_like】的数据库操作Mapper
* @createDate 2025-05-01 17:11:33
* @Entity com.graduation.mybatis.bean.UserLike
*/
public interface UserLikeMapper extends BaseMapper<UserLike> {

    void insertLike(@Param("userId") Long userId, @Param("newsId") Long newsId);
    void deleteLike(@Param("userId") Long userId, @Param("newsId") Long newsId);
    int isUserLiked(@Param("userId") Long userId, @Param("newsId") Long newsId);
    int countLikes(@Param("newsId") Long newsId);
    void updateNewsCommentCount(@Param("newsId") Long newsId, @Param("change") int change);
}




